﻿using System;
public abstract class Animal
{
    public string Name { get; set; }

    public Animal(string name)
    {
        Name = name;
    }

    public abstract void Enjoy();
}
public class Cat : Animal
{
    public string EyesColor { get; set; }

    public Cat(string name, string eyesColor) : base(name)
    {
        EyesColor = eyesColor;
    }

    public override void Enjoy()
    {
        Console.WriteLine($"{Name}（眼睛颜色：{EyesColor}）高兴地笑了笑");
    }
}
public class Dog : Animal
{
    public string FurColor { get; set; }

    public Dog(string name, string furColor) : base(name)
    {
        FurColor = furColor;
    }

    public override void Enjoy()
    {
        Console.WriteLine($"{Name}（毛发颜色：{FurColor}）高兴地叫了叫");
    }
}
public class Lady
{
    public string Name { get; set; }
    public Animal Pet { get; set; }

    public Lady(string name, Animal pet)
    {
        Name = name;
        Pet = pet;
    }

    public void MyPetEnjoy()
    {
        Pet.Enjoy();
    }
}

class Program
{
    static void Main(string[] args)
    {
        Cat cat = new Cat("小花", "蓝色");
        Lady missZhang = new Lady("张女士", cat);
        Console.WriteLine($"{missZhang.Name}的宠物：");
        missZhang.MyPetEnjoy();
        Dog dog = new Dog("大黄", "棕色");
        Lady missWang = new Lady("王女士", dog);
        Console.WriteLine($"{missWang.Name}的宠物：");
        missWang.MyPetEnjoy();
    }
}
